home *** CD-ROM | disk | FTP | other *** search
- Path: peer-news.britain.eu.net!strath-cs!st-and!dtrg
- From: dtrg@st-andrews.ac.uk (David Thomas Richard Given)
- Newsgroups: comp.unix.solaris,comp.unix.programmer,comp.lang.c
- Subject: Re: inline code
- Date: 1 Feb 1996 13:27:24 GMT
- Organization: University Of St. Andrews, Fife, UK.
- Distribution: inet
- Message-ID: <4eqf3s$gob@calvin.st-and.ac.uk>
- References: <lbecker-3101961334210001@206.161.148.20>
- NNTP-Posting-Host: edge.st-and.ac.uk
- NNTP-Posting-User: dtrg
-
- In article <lbecker-3101961334210001@206.161.148.20>,
- Lynn Becker <lbecker@avtec.com> wrote:
- >I have some code that I am trying to port to the SparcStation 20 (Solaris 2.4).
- >We have the sparcworks c compiler. (/opt/SUNWspro/bin/cc) and it is
- >choking on an inline keyword (directive to the previous compiler?). I am
- >looking at the manual and the man pages, but haven't decided whether there
- >is a way to make the sun comiler accepts this notation. Does the gcc
- >compiler accept this? Here is a snippet of the code I am using.
-
- We get that problem compiling gcc code on DEC's standard compiler (cc).
- The problem appears to be that cc simply doesn't understand the inline
- keyword. I solve the problem by putting:
-
- #define inline /* */
-
- ...at the top of my code... OK, so it's just removing the problem
- completely rather than fixing it, but at least it'll compile.
-
- >inline double mathFindVectorMag
- >(
- > CARTESIAN_STRUCT * pVector
- >)
-
- Hmm. The original writer grew up on K&R C. :)
-
- --
- -------------------------------------------------------------------------------
- Why do people surf the Information Superhighway? Won't they get run over?
- http://www-hons-cs.cs.st-andrews.ac.uk/~dg
- Sun-Earther David Daton Given of Lochcarron
-